//
//  AbstractViewController.m
//  DesignPatternDemo
//
//  Created by xiulian.yin on 16/3/9.
//  Copyright © 2016年 YIN.INC. All rights reserved.
//

#import "AbstractViewController.h"

@interface AbstractViewController ()

@end

@implementation AbstractViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    // 通过系统NSNumber的使用反映抽象工厂模式
    NSNumber *number1 = [NSNumber numberWithBool:YES];
    NSNumber *number2 = [NSNumber numberWithChar:'a'];
    NSNumber *number3 = [NSNumber numberWithDouble:2.0];
    NSNumber *number4 = [NSNumber numberWithInteger:4];
    NSArray *arrayNumbers = @[number1,number2,number3,number4];
    
    for (NSNumber *number in arrayNumbers)
    {
        NSLog(@"%@",[[number class] description]);
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
